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mB,GACnBC,aAAc,GACZ,GAAAxC,EAAAC,GAAA,EAACyC,EAAAA,GAAaA,CAAAA,CACZC,QAASvD,EAAIuD,OAAO,CACpBC,aAAc,CACX,MAAuDrD,MAAA,CAAlDsD,OAAOzD,EAAI0D,oBAAoB,EAAEC,cAAc,GAAG,KACzD,CAEDzD,KAAMF,EAAII,WAAW,CACrByB,KAAM,2BAA+CnC,MAAAA,CAApBM,EAAII,WAAW,CAAC,MAAgBR,MAAAA,CAAZF,EAAS,KAAeS,MAAA,CAAZP,EAAY,MAC7EkE,OAAQ9D,EAAIM,MAAM,CAAC,EAAE,CAAGN,EAAIM,MAAM,CAAC,EAAE,CAACC,GAAG,CAAG,EAAE,CAC9CwB,MAAO,CACLC,OAAQ,QACRC,KAAM,YACNC,mBAAoB,sBACtB,GARKlC,EAAII,WAAW,SA/HjC,AA+IH","sources":["webpack://_N_E/?8cad","webpack://_N_E/./pages/region-list-summary/[code]/index.tsx","webpack://_N_E/"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/region-list-summary/[code]\",\n function () {\n return require(\"private-next-pages/region-list-summary/[code]/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/region-list-summary/[code]\"])\n });\n }\n ","import { Box, Stack } from \"@mui/material\";\nimport parlors from \"goi_common/src/constants/parlors_detail.json\";\n\nimport {\n ParlorRegionHeadSection,\n DTypeCardView,\n DTypeRegionHead,\n DTypeParlorList,\n FUNERAL_SIDO,\n FUNERAL_SIGUNGU,\n ParlorDetailProps,\n numberToLocalString,\n GOI_WEB_URL,\n ATypeBreadCrumb,\n ATypeCTA,\n} from \"goi_common\";\nimport { parlorRegion } from \"@/constants/parlorRegion\";\nimport { GetStaticPaths, GetStaticProps } from \"next\";\nimport Head from \"next/head\";\n\n// Path 로직 안내\n// FUNERAL_SIDO, SIGUNGU의 key로 path 설정.\n//\n// 1. getStaticPaths 내 key,value 받아서 value(key)로 추가한 뒤 params로 넘기게 변경\n// 2. getStaticProps 내 props sido,sigungu, sidoName, sigunguName에 split,replace 로직 추가\n\nconst { regionColor, targetSidos } = parlorRegion;\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n const sidoList = Array.from(FUNERAL_SIDO).filter(([key, val]) =>\n targetSidos.includes(String(key))\n );\n\n const sidoPath = sidoList.map(([key, val]) => {\n return {\n params: {\n code: `장례식장 리스트 (${val})`,\n },\n };\n });\n\n const sigunguPaths = Array.from(FUNERAL_SIDO)\n .filter(([key, val]) => targetSidos.includes(String(key)))\n .map(([sidoKey, sidoVal]) => {\n const sigungus = FUNERAL_SIGUNGU.get(sidoKey);\n if (sigungus) {\n return Array.from(sigungus).map(([sigunguKey, sigunguVal]) => {\n return {\n params: {\n code: `장례식장 리스트 (${sidoVal}-${sigunguVal})`,\n },\n };\n });\n }\n })\n .filter((i) => i != null);\n\n return {\n paths: sidoPath.concat(sigunguPaths?.flat() as Array),\n fallback: false,\n };\n};\n\nfunction getByValue(map: Map, searchValue: any) {\n for (const [key, value] of map.entries()) {\n if (value === searchValue) return key;\n }\n}\n\nexport const getStaticProps: GetStaticProps = async ({ params }) => {\n const code = params?.code as string;\n\n if (code.includes(\"-\")) {\n const [sido, sigungu] = code.split(\"-\");\n const sidoName = sido.replace(\"장례식장 리스트 (\", \"\");\n const sidoNumber = getByValue(FUNERAL_SIDO, sidoName);\n const sigunguName = sigungu.replace(\")\", \"\");\n const sigunguNumber = getByValue(\n FUNERAL_SIGUNGU.get(sidoNumber as number) as any,\n sigunguName\n );\n\n const regionParlors = parlors.filter(\n (p) => String(p.sigungu) === String(sigunguNumber)\n );\n\n const 가족장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"가족장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 무빈소장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"무빈소\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 일반장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"일반장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n\n let parlorsString = \"\";\n regionParlors.map((p: any) => {\n if (p.binsos.length > 0) {\n parlorsString += `${p.companyname} ${numberToLocalString(\n p.binsos[0].charge\n )}원, `;\n }\n });\n\n const description = `${sidoName} ${sigunguName} 내 ${regionParlors.length}곳의 장례식장을 대상으로 한 비용 비교: 광주, 전남, 전북 내 모든 장례식장에 대한 비용을 알아보세요. 근조화환, 실시간 빈소, 장례식장 위치 등 해당 장례식장에 필요한 정보들을 알아보세요.`;\n\n return {\n props: {\n regionParlors,\n expectedParlorPrice: { 무빈소장, 가족장, 일반장 },\n sidoName,\n sido: sidoNumber,\n sigunguName,\n sigungu: sigunguNumber,\n isSigungu: true,\n pageDescription: description,\n pageKeywords: `${sidoName} ${sigunguName} 장례식장, ${sidoName} ${sigunguName} 장례식장 추천, ${sidoName} ${sigunguName} 장례식장 비용, ${sidoName} ${sigunguName} 장례식장 평균 예상 비용, ${sidoName} ${sigunguName} 무빈소, ${sidoName} ${sigunguName} 가족장, ${sidoName} ${sigunguName} `,\n pageOgTitle: `${sidoName} ${sigunguName} 지역의 장례식장 목록, 추천, 안내 :: 전라광주장례추천포털`,\n pageOgDescription: description,\n pageOgImage:\n regionParlors.length > 0\n ? regionParlors[0]?.images[0]?.url || \"\"\n : \"\",\n },\n };\n } else {\n const sidoName = code.replace(\"장례식장 리스트 (\", \"\").replace(\")\", \"\");\n const sidoNumber = getByValue(FUNERAL_SIDO, sidoName);\n const regionParlors = parlors.filter((p) => p.sido === String(sidoNumber));\n\n const 가족장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"가족장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 무빈소장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"무빈소\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 일반장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"일반장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n\n let parlorsString = \"\";\n regionParlors.map((p: any) => {\n if (p.binsos.length > 0) {\n parlorsString += `${p.companyname} ${numberToLocalString(\n p.binsos[0].charge\n )}원, `;\n }\n });\n\n const description = `${sidoName} 내 ${regionParlors.length}곳의 장례식장을 대상으로 한 비용 비교: 광주, 전남, 전북 내 모든 장례식장에 대한 비용을 알아보세요. 근조화환, 실시간 빈소, 장례식장 위치 등 해당 장례식장에 필요한 정보들을 알아보세요.`;\n\n return {\n props: {\n regionParlors,\n expectedParlorPrice: { 무빈소장, 가족장, 일반장 },\n sidoName,\n sido: sidoNumber,\n isSigungu: false,\n pageDescription: description,\n pageKeywords: `${sidoName} 장례식장, ${sidoName} 장례식장 추천, ${sidoName} 장례식장 비용, ${sidoName} 장례식장 평균 예상 비용, ${sidoName} 무빈소, ${sidoName} 가족장, ${sidoName} `,\n pageOgTitle: `${sidoName} 지역의 장례식장 목록, 추천, 안내 :: 전라광주장례추천포털`,\n pageOgDescription: description,\n pageOgImage:\n regionParlors.length > 0\n ? regionParlors[0]?.images[0]?.url || \"\"\n : \"\",\n },\n };\n }\n};\n\nexport default function ParlorSlugTypePage({\n regionParlors,\n expectedParlorPrice,\n pageOgTitle,\n sido,\n sidoName,\n sigungu,\n sigunguName,\n isSigungu,\n}: {\n regionParlors: Array;\n expectedParlorPrice: { 무빈소장: number; 가족장: number; 일반장: number };\n pageOgTitle: string;\n sido: string;\n sidoName: string;\n sigungu?: string;\n sigunguName?: string;\n isSigungu: boolean;\n}) {\n const carouselItems = regionParlors.map((res, i) => {\n return {\n \"@type\": \"ListItem\",\n name: `(비용안내) ${res.companyname}`,\n image: `${res.images[0].url}`,\n url: `https://www.honam-funeralcenter.co.kr/funeral-recommend-item/${res.companyname}-(${sidoName} ${sigunguName})/`,\n position: i + 1,\n };\n });\n\n const carouselRichSearch =\n regionParlors.length > 6\n ? {\n \"@context\": \"http://schema.org\",\n \"@type\": \"ItemList\",\n itemListElement: carouselItems,\n }\n : {};\n\n if (regionParlors.length === 0) {\n return <>;\n }\n\n return (\n <>\n \n {pageOgTitle}\n {regionParlors.length > 5 && (\n \n )}\n \n\n \n }\n title={\n \n }\n ctaList={[]}\n />\n\n \n \n \n \n \n \n\n \n (\n \n )}\n />\n \n {isSigungu && (\n (\n \n )}\n />\n )}\n \n \n );\n}\n"],"names":["window","__NEXT_P","push","__webpack_require__","regionColor","parlorRegion","ParlorSlugTypePage","param","regionParlors","expectedParlorPrice","pageOgTitle","sido","sidoName","sigungu","sigunguName","isSigungu","carouselItems","map","res","i","name","concat","companyname","image","images","url","position","carouselRichSearch","length","itemListElement","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","Fragment","jsxs","Head","title","script","type","dangerouslySetInnerHTML","__html","JSON","stringify","ParlorRegionHeadSection","breadCrumb","ATypeBreadCrumb","firstItem","text","href","GOI_WEB_URL","event","domain","path","trigger_and_target","secondItem","thirdItem","undefined","goiHomeEvent","DTypeRegionHead","mainColor","ctaList","Stack","padding","ATypeCTA","Box","width","height","style","background","DTypeParlorList","binsoAveragePrice","CardViewType","FUNERAL_SIGUNGU","DTypeCardView","address","descriptions","Number","binso_average_charge","toLocaleString","FUNERAL_SIDO","get","imgSrc"],"sourceRoot":""}